﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.CompilerServices;

namespace BE.WUC.Menu
{
    [assembly: InternalsVisibleTo("BC")]
    public class MenuItemBE
    {
        public int iUserId { get; set; }
        public string sUserName { get; set; }
        public string sName { get; set; }
        public string sEmail { get; set; }
        public int iMenuItemId { get; set; }
        public string sMenuName { get; set; }
        public string sMenuDescription { get; set; }
        public string sPage { get; set; }
        public int iModuleId { get; set; }
        public string sModuleName { get; set; }
        public string sDescription { get; set; }

        internal List<MenuItemBE> GetMenu( BE.Security.Login.UsuarioBE item)
        {
            List<MenuItemBE> result = new List<MenuItemBE>();
            try
            {
                using (DAL.SiteNaigation.MenuDAL<MenuItemBE> datos = new DAL.SiteNaigation.MenuDAL<MenuItemBE>())
                {
                    result = datos.GetMenu((int)item.iUserId);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("BE.WUC.Menu - MenuItemBE - GetMenu - ", ex);
            }
            return result;
        }
    }
}
